

//
//  SignViewController.m
//  BOSS-SOOC
//
//  Created by apple on 16/8/23.
//  Copyright © 2016年 Gcx. All rights reserved.
//

#import "SignViewController.h"
#import "SCSegmentScrollView.h"
#import "SubLBXScanViewController.h"

@interface SignViewController()<TodaySignTableviewDelegate>

@property (nonatomic,strong) TodaySignTableview *tab;
@property (nonatomic,strong) HistorySignTableview *history;

@end

@implementation SignViewController

- (void)viewDidLoad{
    
    [super viewDidLoad];
    
    [self setNavBarTitle:@"签到"];
    self.automaticallyAdjustsScrollViewInsets=NO;
    NSMutableArray *array=[NSMutableArray array];

    
    self.tab = [[TodaySignTableview alloc]initWithFrame:CGRectMake(0, 0, SIZEWIDTH, SIZEHEIGHT) style:UITableViewStylePlain];
    self.tab.todayDelegate = self;
    self.tab.mainController = self;
    self.history = [[HistorySignTableview alloc]initWithFrame:CGRectMake(0, 0, SIZEWIDTH, SIZEHEIGHT) style:UITableViewStylePlain];
    
    [array addObject:self.tab];
    [array addObject:self.history];
    
    for (int i =0; i<1; i++) {
        UIView *view=[[UIView alloc] init];
        if (i==0) {
            view.backgroundColor=BGC;
        }if (i==1) {
            view.backgroundColor=[UIColor greenColor];
        }
        [array addObject:view];
    }
    

    
    SCSegmentScrollView *scView=[[SCSegmentScrollView alloc] initWithFrame:CGRectMake(0, 64, self.view.bounds.size.width, self.view.bounds.size.height-64) titleArray:@[@"今日签到",@"历史签到"] contentViewArray:array];
    [self.view addSubview:scView];
    
}



#pragma mark- 今日签到代理方法实现
-(void)signWithCode{
        SubLBXScanViewController *vc = [SubLBXScanViewController new];
        vc.delegate = self.tab;
        [self.navigationController pushViewController:vc animated:YES];
}
-(void)signWithClickButton:(SignModel *)model{
    
}


@end
